package cn.itcast.dao;

import cn.itcast.pojo.OrderSetting;
import cn.itcast.pojo.OrderSettings;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @ClassName OrderSettingDao
 * @Description TODO
 * @Author lc
 * @Date 2021/11/15 20:29
 * @Version 1.0
 */
public interface OrderSettingDao {
    /**
     * 查询当前年月的预约数据
     *
     * @param currentYearAndMonth
     * @return
     */
    List<OrderSetting> getOrderSettingsByMonth(String currentYearAndMonth);

    /**
     * 查询预定日子的预约数据
     *
     * @param orderDate
     * @return
     */
    OrderSetting findByDate(String orderDate);

    /**
     * 修改预约数据
     *
     * @param date
     * @param number
     */
    Boolean updateOrderSetting(@Param("date") String date, @Param("number") int number);

    /**
     * 新增预约数据
     *
     * @param date
     * @param number
     */
    Boolean insertOrderSetting(@Param("date") String date, @Param("number") int number);
    //根据时间查找对象
    OrderSetting findByDateAPP(Date date);

    //更新预约人数
    Integer update(OrderSetting orderSetting);
}
